﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using BaccaratRally.DataKernel.Entity;
using BaccaratRally.DataKernel.Service;

namespace BaccaratRally.Service.Api
{
    public partial class Login : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string username = Request.QueryString["UserName"];
            string password = Request.QueryString["Password"];

            UserService us = ServiceFactory.CreateService<UserService>();
            BaccaratRally.DataKernel.Entity.User user = us.GetUser(username, password);

            if (user != null)
            {
                Response.Write(user.UserName + "|" + user.UserSetting);
            }
            else
            {
                Response.Write("Error!");
            }
        }
    }
}